function usernamehide(){
	$('username_menu').style.display='none';
}


function closeOpt(evt) {
  if(evt.keyCode==9) {
    $('username_menu').style.display='none';
  }
}
function inputKeyDown(event, search) {
  if(isUndefined(search)) search = 0;
  if(event.keyCode == 13){
    if(search) searchFriend();
    doane(event);
  }
}
function searchFriend() {
  var username = $('username').value;
  if(username == '搜索好友' || username == '') {
    alert('请输入好友名称');
  } else {
    location.href ='space.html?do=friend&key='+encodeCnURI(username);
  }
}